// picInit - should always be called as first item to initialize common resources
// (C) Copyright 2009, 2010 Communications Programming, Inc.

#include "userLib.h"
#include <plib.h>

// variables externd by other modules needing clock variables

UINT16 TimerTicksPerMicrosec;		// used in timer funcs eg delayTx
UINT32 PBCLK;						// Peripheral Bus Clock

void picInit( UINT32 primaryClockSpeed )
{

	PBCLK = SYSTEMConfigPerformance(primaryClockSpeed);
	TimerTicksPerMicrosec = PBCLK / 1000000L / 8;		// Timers will be scaled 1:8
}

